{template file="member/header.html"/}
<div class="layui-tab layui-tab-brief">
    <ul class="layui-tab-title">
        <li class="layui-this">我的收藏</li>
    </ul>
    <div class="layui-tab-content">
        <div class="layui-tab-item layui-show">
            <table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
        </div>
    </div>
</div>
<script type="text/html" id="barTool">
    <a data-request='{:url("addons/favorite/post")}?catid={{ d.catid }}&id={{ d.cid }}' class="layui-btn layui-btn-danger layui-btn-xs" title="取消收藏" data-table="dataTable">取消收藏</a>
</script>
{template file="member/layui.html"/}
<script>
layui.use(['table'], function() {
    var table = layui.table,
        $ = layui.$,
        form = layui.form;
    table.render({
        elem: '#dataTable',
        toolbar: '#toolbarDemo',
        url: '{:url("addons/favorite/index")}',
        cols: [
            [
                { field: 'title', title: '标题'},
                { field: 'create_time', width: 180, title: '收藏时间' },
                { field: 'url',width: 60,align:"center", title: 'URL',templet:'<div><a href="{{ d.url }}" target="_blank"><i class="iconfont icon-lianjie"></i></a></div>'},
                { fixed: 'right', width: 100, title: '操作', toolbar: '#barTool' }
            ]
        ],
        page: {}
    });

});
</script>
{template file="member/footer.html"/}